package org.dromara.iot.service;

import org.dromara.iot.gateway.MqttGateway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName MqttMessageSender
 * @Description: 类描述
 * @Author: 罗老师
 * @CreateDate: 2025/6/16 0:20
 */
@Component
public class MqttMessageSender {
    @Autowired
    private MqttGateway mqttGateway;
    public void sendMsg(String topic,String msg){
        mqttGateway.sendMsgToMqtt(topic,msg);
    }
    public void sendMsg(String topic,int qos,String msg){
        mqttGateway.sendMsgToMqtt(topic,qos,msg);
    }
}
